import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import(/* webpackChunkName: "login" */ '../views/login.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue'),
    children:[
      {
        path: '/users',
        name: 'users',
        component: () => import(/* webpackChunkName: "users" */ '../views/Users.vue')
      },
      {
        path: '/roles',
        name: 'roles',
        component: () => import(/* webpackChunkName: "roles" */ '../views/Juese.vue')
      },
      {
        path: '/rights',
        name: 'rights',
        component: () => import(/* webpackChunkName: "rights" */ '../views/Quanxian.vue')
      },
      {
        path: '/goods',
        name: 'goods',
        component: () => import(/* webpackChunkName: "goods" */ '../views/Goods.vue')
      },
      {
        path: '/categories',
        name: 'categories',
        component: () => import(/* webpackChunkName: "categories" */ '../views/Goodsfenlei.vue')
      },
      {
        path: '/params',
        name: 'params',
        component: () => import(/* webpackChunkName: "params" */ '../views/Goodscanshu.vue')
      },
      {
        path: '/orders',
        name: 'orders',
        component: () => import(/* webpackChunkName: "orders" */ '../views/Dindan.vue')
      },
      {
        path: '/reports',
        name: 'reports',
        component: () => import(/* webpackChunkName: "reports" */ '../views/Shuju.vue')
      },
      {
        path: '/ez',
        name: 'ez',
        component: () => import(/* webpackChunkName: "ez" */ '../views/ez.vue')
      },
      {
        path: '/goodsadd',
        name: 'goodsadd',
        component: () => import(/* webpackChunkName: "ez" */ '../views/Goodsadd.vue')
      },
      {
        path: '/bianjiqi',
        name: 'bianjiqi',
        component: () => import(/* webpackChunkName: "ez" */ '../views/Bianjiqi.vue')
      },
    ]
  },
  
]

const router = new VueRouter({
  routes
})

export default router
